home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / Xm / XmeNamesAreEqual.z / XmeNamesAreEqual
Text File  |  1998-10-30  |  6KB  |  133 lines

  1.  
  2.  
  3.  
  4.      XXXXmmmmeeeeNNNNaaaammmmeeeessssAAAArrrreeeeEEEEqqqquuuuaaaallll((((3333XXXX))))      UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV      XXXXmmmmeeeeNNNNaaaammmmeeeessssAAAArrrreeeeEEEEqqqquuuuaaaallll((((3333XXXX))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XXXXmmmmeeeeNNNNaaaammmmeeeessssAAAArrrreeeeEEEEqqqquuuuaaaallll - Compares two strings for equality
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.           #include <Xm/XmP.h>
  13.           BBBBoooooooolllleeeeaaaannnn XXXXmmmmeeeeNNNNaaaammmmeeeessssAAAArrrreeeeEEEEqqqquuuuaaaallll(
  14.           cccchhhhaaaarrrr ****iiiinnnn____ssssttttrrrr,
  15.           cccchhhhaaaarrrr ****tttteeeesssstttt____ssssttttrrrr);
  16.  
  17.      VVVVEEEERRRRSSSSIIIIOOOONNNN
  18.           This page documents Motif 2.1.
  19.  
  20.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  21.           XXXXmmmmeeeeNNNNaaaammmmeeeessssAAAArrrreeeeEEEEqqqquuuuaaaallll compares _i_n__s_t_r to _t_e_s_t__s_t_rand returns True
  22.           if they are equivalent. Typically, _i_n__s_t_rholds some Motif
  23.           constant, such as "Xm1000TH_INCHES" and _t_e_s_t__s_t_r holds a
  24.           normalized version of a constant, such as "1000th_inches".
  25.  
  26.           The case of letters in _i_n__s_t_r is irrelevant.  For comparison
  27.           purposes, XXXXmmmmeeeeNNNNaaaammmmeeeessssAAAArrrreeeeEEEEqqqquuuuaaaallll automatically converts all
  28.           letters in _i_n__s_t_r to lowercase.  By contrast, all letters in
  29.           _t_e_s_t__s_t_r must be lowercase.  If any letter in _t_e_s_t__s_t_r is
  30.           uppercase, then XXXXmmmmeeeeNNNNaaaammmmeeeessssAAAArrrreeeeEEEEqqqquuuuaaaallll automatically returns
  31.           False.
  32.  
  33.           For example, if _i_n__s_t_r contains "Goodbye" and _t_e_s_t__s_t_r
  34.           contains "goodbye", XXXXmmmmeeeeNNNNaaaammmmeeeessssAAAArrrreeeeEEEEqqqquuuuaaaallll returns True (because
  35.           the function converts "Goodbye" to "goodbye").  However, if
  36.           _i_n__s_t_r contains "Goodbye" and _t_e_s_t__s_t_r contains "Goodbye",
  37.           XXXXmmmmeeeeNNNNaaaammmmeeeessssAAAArrrreeeeEEEEqqqquuuuaaaallll returns False (because of the uppercase "G"
  38.           in _t_e_s_t__s_t_r).
  39.  
  40.           XXXXmmmmeeeeNNNNaaaammmmeeeessssAAAArrrreeeeEEEEqqqquuuuaaaallll treats the following prefixes specially:
  41.           _X_M, XXXXmmmm, xxxxMMMM, and xxxxmmmm.  If one of these prefixes appears in
  42.           _i_n__s_t_r, XXXXmmmmeeeeNNNNaaaammmmeeeessssAAAArrrreeeeEEEEqqqquuuuaaaallll skips over it and begins the
  43.           comparison at the third character in _i_n__s_t_r.  For example,
  44.           if _i_n__s_t_r contains "XMhello" and _t_e_s_t__s_t_rcontains "hello",
  45.           then XXXXmmmmeeeeNNNNaaaammmmeeeessssAAAArrrreeeeEEEEqqqquuuuaaaallll returns True.  However,
  46.           XXXXmmmmeeeeNNNNaaaammmmeeeessssAAAArrrreeeeEEEEqqqquuuuaaaallll provides no special treatment if one of
  47.           these prefixes appears in _t_e_s_t__s_t_r.  For example, if _i_n__s_t_r
  48.           contains "XMhello" and _t_e_s_t__s_t_rcontains "xmhello", then
  49.           XXXXmmmmeeeeNNNNaaaammmmeeeessssAAAArrrreeeeEEEEqqqquuuuaaaallll returns False.
  50.  
  51.           When the strings to be compared are enumerated values, then
  52.           you should probably consider using the representation type
  53.           facility of Motif instead of XXXXmmmmeeeeNNNNaaaammmmeeeessssAAAArrrreeeeEEEEqqqquuuuaaaallll. The
  54.           representation type facility of Motif obeys the same string
  55.           comparison rules as XXXXmmmmeeeeNNNNaaaammmmeeeessssAAAArrrreeeeEEEEqqqquuuuaaaallll.
  56.  
  57.           XXXXmmmmeeeeNNNNaaaammmmeeeessssAAAArrrreeeeEEEEqqqquuuuaaaallll is used primarily by programmers writing
  58.           their own resource converters.
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                                         (printed 10/24/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXmmmmeeeeNNNNaaaammmmeeeessssAAAArrrreeeeEEEEqqqquuuuaaaallll((((3333XXXX))))      UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV      XXXXmmmmeeeeNNNNaaaammmmeeeessssAAAArrrreeeeEEEEqqqquuuuaaaallll((((3333XXXX))))
  71.  
  72.  
  73.  
  74.           _i_n__s_t_r    Specifies one of the two strings to compare.  A
  75.                     prefix of _X_M, XXXXmmmm, xxxxMMMM, or xxxxmmmm is ignored, as is the
  76.                     case of letters appearing in the string.
  77.  
  78.           _t_e_s_t__s_t_r  Specifies the other string to compare.  This
  79.                     string should not start with the prefix _X_M, XXXXmmmm,
  80.                     xxxxMMMM, or xxxxmmmm.  Also, all letters in the string must
  81.                     be lowercase letters.
  82.  
  83.      RRRREEEETTTTUUUURRRRNNNN
  84.           Returns True if the strings match.  Otherwise, it returns
  85.           False.
  86.  
  87.      RRRREEEELLLLAAAATTTTEEEEDDDD
  88.           XXXXmmmmRRRReeeeppppTTTTyyyyppppeeeeRRRReeeeggggiiiisssstttteeeerrrr(3).
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                                         (printed 10/24/98)
  130.  
  131.  
  132.  
  133.